#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
#include <time.h>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
    srand(time(0));
}



void Widget::on_pushButton_refuse_clicked()
{
    ui->label->setText("100万都不要，你无敌了哥们儿");
}

void Widget::on_pushButton_agree_clicked()
{
}

void Widget::on_pushButton_agree_pressed()
{
    //获取当前窗口坐标，并随机生成按钮的新位置
    int x = rand() % this->geometry().width();
    int y = rand() % this->geometry().height();

    //移动按钮位置
    ui->pushButton_agree->move(x,y);
}
